//
//  USChatController.h
//  us
//
//  Created by karry on 2025/4/6.
//

#import "DTViewController.h"
#import "USChatUIController.h"
#import "USMessageViewModel.h"
#import "SceneDelegate.h"

NS_ASSUME_NONNULL_BEGIN

@interface USChatController : USChatUIController 

@property (nonatomic, strong) NSString *conversationId;
@property (nonatomic, strong) EMConversation *conversation;
@property (nonatomic, strong) NSString *moreMsgId;  //第一条消息的消息id
@property (nonatomic) NSTimeInterval msgTimelTag;   //消息时间格式化

//存消息的viewModel
@property (nonatomic,strong)NSMutableArray <USMessageViewModel *>*messageList;
@property (nonatomic,strong) UITableView *tableView;

//插入历史消息
- (void)refreshMsg:(NSArray<EMChatMessage *> *)messages
    isInsertBottom:(BOOL)isInsertBottom
    isScrollBottom:(BOOL)isScrollBottom;

- (void)refreshMsg:(NSArray<EMChatMessage *> *)messages
    isInsertBottom:(BOOL)isInsertBottom
    isScrollBottom:(BOOL)isScrollBottom
          animated:(BOOL)animated;


//插入发送的消息消息
- (void)insertSendMsg:(EMChatMessage *)messages;

- (void)msgStatusDidChange:(EMChatMessage *)aMessage
                     error:(EMError *)aError;

@end

NS_ASSUME_NONNULL_END
